package jpavlich.cardsorter.action;

import jpavlich.cardsorter.Util;
import fr.inria.zvtm.engine.Camera;
import fr.inria.zvtm.engine.View;
import fr.inria.zvtm.glyphs.Glyph;

public class CenterCameraOnGlyph extends MoveCamera {

	private float mFactor;
	private String glyphID;




	public CenterCameraOnGlyph(Glyph g, float mFactor, int duration, View view,
			Camera camera) {
		super(Util.calculateDestination(g, mFactor, view, camera), duration, view, camera);
		this.glyphID = getResourceManager().getResourceID(g);
		this.mFactor = mFactor;
	}

	
	
	
    @Override
	void execute() {
		to = Util.calculateDestination((Glyph) getResourceManager().findResource(glyphID), mFactor, (View) getResourceManager().findResource(viewID), (Camera) getResourceManager().findResource(cameraID));
		moveCameraTo(to);
	}
 
	
}
